<?php 

$process = new swoole_process('callback_function', true); 

$pid = $process->start(); 

function callback_function(swoole_process $worker) 
{ 
    
    while($input = $worker->read()){
      sleep(1);
      echo $input;
      if($input == "Quit\n"){
        break;
      }
    }
    //$worker->exec('/usr/bin/php', array(__DIR__."/input.php")); 
}